package cn.zh.npro.Activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

import java.util.ArrayList;

import cn.zh.npro.Adapter.OSAdapter;
import cn.zh.npro.Item.OsItem;
import cn.zh.npro.R;

public class OrState extends BaseActivity {

    ListView odlist;
    OSAdapter osAdapter;
    ArrayList<OsItem> osItems=new ArrayList<>();
    ImageView staback;
    TextView ornum;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_or_state);
        initor();
        }

  public void initor(){
        for (int i=0;i<10;i++){
            OsItem osItem=new OsItem();
            osItems.add(osItem);
        }
        ornum = findViewById(R.id.ornum);
     odlist=findViewById(R.id.odlist);
      staback=findViewById(R.id.staback);
     osAdapter=new OSAdapter(OrState.this,osItems);
     odlist.setAdapter(osAdapter);
      staback.setOnClickListener(this);
     }

    @Override
    public void onClick(View view) {
        super.onClick(view);
        int id=view.getId();
        switch (id){
            case R.id.staback:
                finish();
                break;

        }


    }
}
